using System;
using System.Collections.Generic;
using System.Text;
using WeifenLuo.WinFormsUI.Docking;

namespace SCSFContrib.CompositeUI.WinForms.SmartPartInfos
{
    public class DockStateShowStrategy : IShowStrategy
    {
        private DockState dockState;

        public DockState DockState
        {
            get { return dockState; }
            set { dockState = value; }
        }

        public DockStateShowStrategy(DockState dockState)
        {
            this.dockState = dockState;
        }

        void IShowStrategy.Show(IDockPanelWorkspace workspace, IDockContent content)
        {
            // Mapping of the enum
            int value = (int)DockState;
            WeifenLuo.WinFormsUI.Docking.DockState dockState = 
                (WeifenLuo.WinFormsUI.Docking.DockState)Enum.ToObject(
                typeof(WeifenLuo.WinFormsUI.Docking.DockState), value);
            
            content.DockHandler.Show(workspace.DockPanel, dockState);
        }
    }

    public enum DockState
    {
        Unknown = 0,
        Float = 1,
        DockTopAutoHide = 2,
        DockLeftAutoHide = 3,
        DockBottomAutoHide = 4,
        DockRightAutoHide = 5,
        Document = 6,
        DockTop = 7,
        DockLeft = 8,
        DockBottom = 9,
        DockRight = 10,
        Hidden = 11
    }
}
